package com.bignerdranch.android.criminalintent;

import org.json.JSONException;
import org.json.JSONObject;

public class Photo {
	private static final String JSON_FILENAME = "filename";	
	private String mFileName;
	
	public Photo(String fileName){
		mFileName = fileName;
	}
	
	public Photo(JSONObject json) throws JSONException{
		mFileName = json.getString(JSON_FILENAME);
	}
	
	public JSONObject toJson() throws JSONException{
		JSONObject obj = new JSONObject();
		obj.putOpt(JSON_FILENAME, mFileName);
		return obj;
	}
	
	public String getFileName(){
		return mFileName;
	}
}
